const path = require('path');
const port = process.env.port || 8080 // 端口
module.exports = {
  transpileDependencies: ['single-spa','qiankun','import-html-entry'],
  // chainWebpack: config => {
  //   config.resolve.alias.set('./patchers', path.resolve(__dirname, 'src/assets/patchers.js'))
  // }
  // webpack-dev-server 相关配置
  devServer: {
    host: '0.0.0.0',
    port: port,
    open: true,
    proxy: {
      // detail: https://cli.vuejs.org/config/#devserver-proxy
      [process.env.VUE_APP_BASE_API]: {
        target: `http://localhost:9001`,
        changeOrigin: true,
        pathRewrite: {
          ['^' + process.env.VUE_APP_BASE_API]: ''
        }
      }
    },
    disableHostCheck: true
  },
};

